<?php
namespace Demo\Model;

use Think\Model;

class TokenModel extends Model {
    public function insertToken(){
        $token = uniqid();
        $status = 10;
        $data = array();
        $data['token'] = $token;
        $data['status'] = $status;
        M('token')->add($data);
        return $token;
    }
}